The sample PowerShell scripts that are provided in this SDK are intended only to help you get started. They are not intended to provide a complete web services client that you can use out of the box. They are located in the following folder:
Symantec Endpoint Protection Installation file\Tools\Integration\SEPM_WebService_SDK\SampleCode\PowerShell\
Prerequisites
PowerShell 3.0 or later, run as Administrator
Client ID and client secret obtained from Symantec Endpoint Protection Manager
See Registering an application with Symantec Endpoint Protection Manager.
If you run the scripts against a remote Symantec Endpoint Protection Manager server, edit the configuration file (config.xml) to provide the hostname and web services port of the Symantec Endpoint Protection Manager instance. If you run the scripts locally, and if you installed Symantec Endpoint Protection Manager with the default values, you can skip this step.
If you run the scripts against a remote Symantec Endpoint Protection Manager server, you must also edit the WSDL files to provide the hostname and web services port of the Symantec Endpoint Protection Manager instance. See Static WSDL files.
Edit the configuration file (config.xml) to replace the example client ID and client secret with the values that you obtained. This file is parsed by all the other sample scripts. If you encounter problems with your web services connection or with authentication, check this file first to make sure that you have the correct values.
Note: |
If you encounter persistent errors with the scripts that get the access token, you can work around the issue by obtaining the token directly through browser calls. You must use Chrome, Firefox, or Internet Explorer 9 or later. This issue exists on the server, not in the PowerShell scripts. See Authorizing an application to call Symantec Endpoint Protection Manager web services. See Getting an OAuth access token from the authorization code. |
Note: |
These scripts explicitly ignore certificate errors. Your web service client application should properly install the self-signed certificate that Symantec Endpoint Protection Manager requires. |
Table: PowerShell scripts
|
File name |
Description |
Notes |
||
|---|---|---|---|---|
|
|
Provides an example of how to obtains an OAuth access token for a web services client application, and writes the token to |
Run this script first to obtain the access token that is required by all web service calls. See Using OAuth with Symantec Endpoint Protection Manager web services. |
||
|
|
Provides an example of how to obtain an OAuth access token manually for a web services client application |
We recommend that you use Write-AccessTokenToConfig.ps1. If you run |
||
|
|
Provides an example of how to create a PowerShell interface for the web services |
|
||
|
|
Provides an example of how to convert a JSON object to a PowerShell object
|
Access tokens are provided as JSON objects. See Getting an OAuth access token from the authorization code. |
||
|
|
Provides an example of how to obtain lists of Symantec Endpoint Protection clients or groups of clients |
The client lists that are provided by the ClientService web service are used as input parameters to the methods of the Group IDs are used as input parameters to the methods of the |
||
|
|
Provides an example of how to send commands to a list of clients or groups and get the status of the command that was sent |
|||
|
|
Provides an example of how to retrieve the status of license information |
See License reporting. |
||
|
|
Provides an example of how to run LiveUpdate and get the status of LiveUpdate content on the Symantec Endpoint Protection Manager server |
|||
|
|
Provides information about how to assign policies to lists of client groups |
For more information about the methods that are provided by each web service, see the Reference Guide.
See Constructing a web services client application from the WSDL files.